﻿// --------------------------------------------------------------------------------------------------------------------
// <copyright file="Class1.cs" company="">
//   
// </copyright>
// <summary>
//   Defines the ExtensionsMath type.
// </summary>
// --------------------------------------------------------------------------------------------------------------------

namespace devMobile.Math
{
    using System;

    public static class ExtensionsMath
    {
        public static double SquareOf(this double value)
        {
            return Math.Pow(value, 2);
        }

        public static float ToRadians(this float degress)
        {
            return Convert.ToSingle(Math.PI / 180) * degress;
        }

        public static double ToRadians(this double degress)
        {
            return Convert.ToSingle(Math.PI / 180) * degress;
        }

        public static double ToDegrees(this float radians)
        {
            return radians * (180.0 / Math.PI);
        }
    }
}
